﻿@model IEnumerable<Project_veilingsite.Models.UserProfile>
@{
    ViewBag.Title = "Administratie";
}

<div id="content">
    <h1>Administratiegedeelte</h1>
    <b><u>Rollen Wijzigen</u></b>
    <table>
        <tbody>
            <tr>
                <th>Rollen Wijzigen</th>
            </tr>
            
            @foreach(var user in Model) {
            using (Html.BeginForm("ChangeRole", "Admin", FormMethod.Post, new { id = "formRollen" }))
            {
               
                    <tr>
                        <td>
                            @user.UserName
                            <input type="hidden" value="@user.UserName" name="username" />
                        </td>
                        <td>
                            <input type="submit" value="Wijzig" class="btn" />
                        </td>
                    </tr>
                }
            }
        </tbody>
    </table>
</div>

@Html.Partial("_sidebar")